<template>
  <div>
      <div>欢迎使用</div>
      <input type="text" v-model="user">
      <input type="text" v-model="paws">
      <button @click="login">登录</button>
  </div>
</template>

<script>
export default {
    data(){
        return{
            user:'admin',
            paws:'123'
        }
    },
    methods:{
        login(){
           if(this.user === 'admin' && this.paws === '123'){
               this.$message.success('登录成功',1,()=>{
                   this.$router.push('/')
               })

           }else{
              this.$message.warning('用户名或密码错误')
           }
        }
    }
}
</script>

<style>

</style>